package com.zhuoan.im.webapp.biz;

import com.zhuoan.im.webapp.dao.model.reqbody.GroupBody;
import org.jim.common.packets.Group;

import java.util.List;

/**
 * GroupsBiz
 *
 * @author weixiang.wu
 * @date 2018 -10-15 17:01
 */
public interface GroupsBiz {

    /**
     * 根据 创建人id，查找出当前用户的所有群组
     *
     * @param creatorUserId the creator user id
     * @return the list
     */
    List<Group> queryGroupByCreatorUserId(Long creatorUserId);


    /**
     * 查询群组，包括群组内的所有人员信息
     *
     * @param creatorUserId the creator user id
     * @param myFriends     the my friends
     * @return the list
     */
    List<Group> queryGroupByCreatorUserIdAndType(Long creatorUserId, Integer myFriends);

    /**
     * 新增一个群组
     *
     * @param groupBody the group body
     * @return the group
     */
    Group createGroup(GroupBody groupBody);

    /**
     * 根据操作类型，对组内人员进行增删
     *
     * @param groupBody the group body
     */
    void operateGroupMember(GroupBody groupBody);
}
